
{include file="common/header.tpl"}
<body>
<div id="wrapper">
{include file="common/toptab.tpl"}

{if $smarty.get.act eq "slide"} 
   {assign var="slide" value="current"}
{else}
	{assign var="gallery" value="current"}
{/if}
<div id="tabs4">
	<ul>
	 	<li id="{$gallery}"><a href="?module={$smarty.get.module}&sub1=gallery"><span>Gallery</span></a></li>
        <li id="{$slide}"><a href="?module={$smarty.get.module}&sub1=slide"><span>Gallery Slide</span></a></li>
	</ul>
</div>

{* Check which item is currently active and load correspond template*}
{if $smarty.get.sub1 eq "slide"}
	
{else}
	<script src="../view/admin/js/module_gallery.js" type="text/javascript"></script>
	{if $smarty.get.act eq "newgallery" || $smarty.get.act eq "editgallery"}
		{include file="BgcmsGallery/form_gallery.tpl"}
    {elseif $smarty.get.act eq "listalbum" || $smarty.get.act eq "editalbum"}
		{include file="BgcmsGallery/form_album.tpl"}
        {include file="BgcmsGallery/list_album.tpl"}    
    {elseif $smarty.get.act eq "listphotos" || $smarty.get.act eq "editphotos"}
		{include file="BgcmsGallery/form_photos.tpl"}
        {include file="BgcmsGallery/list_photos.tpl"}
	{else}
		{include file="BgcmsGallery/list_gallery.tpl"}
	{/if}
{/if}
</div>
</body>
</html>